from fissix.fixer_base import BaseFix  # type: ignore
from fissix.pytree import Leaf, Node  # type: ignore
from typing import Any, Callable, Dict, List, Optional, Type, Union

class Passthrough:
    def __init__(self, target: Any) -> None: ...
    def __getattr__(self, name: str) -> Any: ...

TOKEN: Any
SYMBOL: Any
SENTINEL: Any
START: Any
DROP: Any
STARS: Any
ARG_END: Any
ARG_LISTS: Any
ARG_ELEMS: Any
LN = Union[Leaf, Node]
Stringish = Union[str, object]
Filename: Any
FilenameMatcher = Callable[[Filename], bool]
Capture = Dict[str, Any]
Callback = Callable[[Node, Capture, Filename], Any]
Filter = Callable[[Node, Capture, Filename], bool]
Fixers = List[Type[BaseFix]]
Hunk = List[str]
Processor = Callable[[Filename, Hunk], bool]

class Transform:
    selector: str = ...
    kwargs: Dict[str, Any] = ...
    filters: List[Filter] = ...
    callbacks: List[Callback] = ...
    fixer: Optional[Type[BaseFix]] = ...
    def __init__(
        self, selector: Any, kwargs: Any, filters: Any, callbacks: Any, fixer: Any
    ) -> None: ...
    def __lt__(self, other: Any) -> Any: ...
    def __le__(self, other: Any) -> Any: ...
    def __gt__(self, other: Any) -> Any: ...
    def __ge__(self, other: Any) -> Any: ...

class BowlerException(Exception):
    filename: Any = ...
    hunks: Any = ...
    def __init__(
        self, message: str = ..., *, filename: str = ..., hunks: List[Hunk] = ...
    ) -> None: ...

class BowlerQuit(BowlerException): ...
class IMRError(BowlerException): ...
class RetryFile(BowlerException): ...
class BadTransform(BowlerException): ...
